#ifndef _GUI_HPP_
#define _GUI_HPP_

void SetColor(body * list, int id) {		//color all the particles
	GLfloat R,G,B;

	double vel_max = 15;

	double vel = sqrt(pow(list[id].vel.x,2) + pow(list[id].vel.y,2) 
		   + pow(list[id].vel.z,2));

	if (vel_max != 0) {
		R = vel / vel_max;
		G = 1 - vel / vel_max;
		if ( G < 0 ) G = 0;
		B = 0;
	} else {
		R = 0;
		G = 1;
		B = 0;
	}
	glColor3f(R, G, B);
}
#endif
